import Vue from 'vue';
import VueRouter from 'vue-router';//路由

//views
import page from '../views/page';
import topic from '../views/topic';

Vue.use(VueRouter);

// 实例化VueRouter，配置参数

const router = new VueRouter({
	history: true,
	hashbang: false,
	transitionOnload: true,
	routes: [
		{
			path: '/',
			name: 'index',
			component: page,
		},
		{
			path: '/topic/:id',
			name: 'topic',
			component: topic,
		}
	]
});

export default router;
